package org.giovanolli.mumi.view.converter;

import javax.faces.convert.FacesConverter;

import org.giovanolli.mumi.entities.Specialist;

@FacesConverter(value = "specialistConverter")
public class SpecialistConverter extends SelectItemsBaseConverter<Specialist> {
	@Override
	public String getAsString(Object value) {
		return ((Specialist) value).getId().toString();
	}

	@Override
	public String getItemLabel(Specialist object) {
		return object != null ? object.getDocumentNumber() : null;
	}

	@Override
	public Object getItemValue(Specialist object) {
		return object;
	}

}